package Iterator;

/**
 *
 */
import java.io.*;
import java.util.*;

public class Test  {
    public static void main(String[] args) {
        String fileName = "D:\\work\\eclipse\\workspace\\designpattern\\src\\Iterator\\data.txt";
        DataVector dataVector = new DataVector(fileName);
//        Collection c = new ArrayList();
//        c.iterator();
//        List list = new ArrayList();
//        list.iterator();
//        Map map = new HashMap();
        Iterator iVector = dataVector.CreateIterator();//此处为关键点请注意
        
        for(iVector.First(); ! iVector.IsDone(); iVector.Next()) {
            iVector.CurrentItem();
        }
    }
}